﻿using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using RecipeProject.Model;
using System.Collections.Generic;
using RecipeProject.DataAccess;

namespace RecipeSL.Web
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class RecipeService
    {
        static RecipeDatabase recipes = new RecipeDatabase();

        [OperationContract]
        public Recipe[] GetRecipes()
        {
            return recipes.GetRecipes().ToArray();
        }

        [OperationContract]
        public void UpdateRecipe(Recipe recipe)
        {
            return;
        }

        // Add more operations here and mark them with [OperationContract]
    }
}
